//
//  WXApplication.swift
//  mlz
//
//  Created by 吕凌 on 2018/7/8.
//  Copyright © 2018年 吕凌. All rights reserved.
//

import Foundation

public extension WXApplication {
    
    @objc public func openURL(_ urlStr: String, callback: @escaping WXModuleKeepAliveCallback) {
        let url = URL.init(string: urlStr)
        if(UIApplication.shared.canOpenURL(url!)) {
            UIApplication.shared.openURL(url!)
            callback(true, false)
        } else {
            callback(false, false)
        }
    }
}
